package com.tjetc.controller;

import com.tjetc.common.JsonResult;
import com.tjetc.service.OrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin/orderDetail")
public class OrderDetailController {
    @Autowired
    private OrderDetailService orderDetailService;

    // 列出指定order下的所有order详情
    @RequestMapping("list")
    public JsonResult list(@RequestParam("id") Integer id) {
        return new JsonResult<>(0, "", orderDetailService.selectByOrderId(id));
    }
}
